#include "_al_qspi_mod.h"

void delay_us(unsigned int us_){
    // porting
};
void set_pin(unsigned int pin_, unsigned int val_){
    // porting
};

int main()
{
    sal_qspi_info_t devx = {    
        .cs_num_ = 1,
        .clk_pin_ = 2,
        .cs_pins_ = {3,4,5,6,7,8,9,10,},
        .dat_pins_ = {11,12,13,14}
    };

    // registering delay & set_pin function, reset 1 cs pin, reset dat pins
    sal_qspi_init(
        (sal_qspi_info_t*)&devx,
        (unsigned long long)1,
        // _STAUS_HIGH_LEVEL,
        // _STAUS_HIGH_LEVEL, 
        delay_us,
        set_pin
    );

    while(1){
        // write [64]-bits data [0x12345678abcdef] to selected chip [(unsigned long long)0], info contained in [devx]
        sal_qspi_wdat_64bit(
            (sal_qspi_info_t*)&devx,
            (unsigned long long)0,
            (unsigned long long)0x12345678abcdef,
            (unsigned long long)64
        );
    }
}